package com.lxg.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 陆小根
 * date: 2022/04/24
 * Description:
 * 对SpringMVC进行自定义配置
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {

  @Override
  public void addViewControllers(ViewControllerRegistry registry) {
    registry.addViewController("/login.html").setViewName("login");
    registry.addViewController("/index.html").setViewName("index");
  }
}
